package Herotestw;
import ss.Hero;//我也调用了父类的包
//我是子类2
public class KamenRider extends Hero{
    private String ridertruename;
    private String mantra;
    public void connection(){
        System.out.println("假面骑士的场合！！");
    }


    public KamenRider(String name , int age, int fightpower, int defendpower, String superpower,String ridertruename, String mantra,boolean standpoint,String maincolor ,String typelike) {
        super(name, age, fightpower, defendpower, superpower,standpoint,maincolor,typelike);
        this.ridertruename = ridertruename;
        this.mantra = mantra;
    }
    public void setRiderInfo(String inputn, int inputa,int inputf,int inputd,String inputs, String printr, String printm){
        super.setHeroInfo(inputn, inputa);
        super.setPower(inputf, inputd, inputs);
        ridertruename = printr;
        mantra = printm;
    }
    public void getRiderInfo(){
        super.getHeroInfo();
        super.getPower();
    }

    public String toString(){
        super.toString();
        return "骑士名[" + ridertruename + ", 口头禅[" + mantra + "]"; 
    }
    public boolean equals(Object obj){
        if(obj instanceof KamenRider){
            KamenRider ka = (KamenRider) obj;
            if(this.ridertruename == ka.ridertruename && this.mantra ==ka.mantra){
                return true;
            }
            else{
                return false;
            }
        }
        else{
            return false;
        }
    }
}